<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/9/3
  Time: 17:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>系统公告</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <%--引入LayUI--%>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../layui/layui.js"></script>
    <script src="../js/jquery-3.1.0.js"></script>

    <style>
        body {
            background-color: #eeeeee;
        }

        .layui-row {
            padding: 10px;
            margin: 10px;
            background-color: white;
            border-radius: 5px;
        }

        .left {
            width: 20%;
            text-align: right;
        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">


    <%--面包屑--%>
    <div class="layui-row">
        <div class="layui-col-lg12">
                <span class="layui-breadcrumb">
                  <a href="http://localhost/admin/admin.jsp">首页</a>
                    <a class="" href="javascript:;">系统设置</a>
                    <a href="http://localhost/admin/write.jsp">系统公告</a>
                </span>
        </div>
    </div>


    <%--公告表格盒子--%>
    <div class="layui-row">
        <%--公告信息表格--%>
        <table class="layui-hide" id="msg-table" lay-filter="msg-table"></table>
    </div>


</div>
</body>

<%--头部工具栏--%>
<div id="msg-table-toolbar" style="display: none">
    <div class="test-table-reload-btn">
        <div class="layui-inline" style="border: #009f95 solid 1px">
            <label for="queryKey"></label>
            <input class="layui-input" id="queryKey" autocomplete="off" placeholder="输入公告标题查询">
        </div>
        <a class="layui-btn layui-btn-primary layui-border-green" lay-event="queryMsg">搜 索</a> <%--按字段查询--%>
        <a class="layui-btn layui-btn-primary layui-border-green" lay-event="queryAll">全 部</a> <%--查询全部--%>
        <a class="layui-btn layui-btn-primary layui-border-green" lay-event="addNew">新 增</a> <%--新增公告--%>
    </div>
</div>

<%--操作栏--%>
<div id="msg-table-tool" style="display: none">
    <button class="layui-btn layui-btn-radius  layui-btn-primary layui-border-green layui-btn-xs" lay-event="detail">
        查看详情
    </button>
    <button class="layui-btn layui-btn-radius  layui-btn-primary layui-border-green layui-btn-xs" lay-event="addFile">
        添加附件
    </button>
</div>


<%--文件上传--%>
<div class="layui-row" id="add-file-box" style="display: none">
    <div class="layui-form-item">
        <label class="layui-form-label">公告附件上传</label>
        <div class="layui-btn-container">
            <button type="button" class="layui-btn layui-btn-normal" id="msg-sfile-choose">
                <i class="layui-icon layui-icon-link"></i>选择文件
            </button>
            <button type="button" class="layui-btn layui-btn-danger" id="msg-sfile-upload">
                <i class="layui-icon layui-icon-upload"></i>开始上传
            </button>
        </div>
    </div>
</div>


<%--公告详情模板--%>
<div class="layui-row" id="msg-detail" style="display: none">
    <table class="layui-table" lay-skin="line">
        <tbody>
        <tr>
            <td class="left">编号:</td>
            <td id="msg-id"></td>
        </tr>
        <tr>
            <td class="left">标题:</td>
            <td id="msg-title"></td>

        </tr>
        <tr>
            <td class="left">发布人:</td>
            <td id="msg-author"></td>

        </tr>
        <tr>
            <td class="left">发布时间:</td>
            <td id="msg-time"></td>
        </tr>
        <tr>
            <td class="left">公告内容:</td>
            <td id="msg-content"></td>
        </tr>
        <tr>
            <td class="left">附件:</td>
            <td id="msg-fileName"></td>
        </tr>
        </tbody>
    </table>
</div>


<%--新增公告页面--%>
<div class="layui-row" id="msgAdd" style="display: none">
    <form class="layui-form" action="" autocomplete="off" lay-filter="component-form-group">
        <div class="layui-form-item">
            <label class="layui-form-label">公告标题：</label>
            <div class="layui-input-block"><input type="text" name="msg_title" required lay-verify="required"
                                                  class="layui-input"></div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发布人：</label>
            <div class="layui-input-block"><input type="text" name="msg_from" required lay-verify="required"
                                                  class="layui-input"></div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">公告内容：</label>
            <div class="layui-input-block">
                <textarea name="msg_content" required lay-verify="required" placeholder="请输入公告内容"
                          class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-col-lg2 layui-col-lg-offset5">
            <button class="layui-btn" name="account-add-btn1" lay-submit lay-filter="msgAdd">添加</button>
        </div>
    </form>
</div>


<script src="js/write.js"></script>


</html>
